home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_gimp.idb / usr / freeware / share / gimp / scripts / bovinated-logo.scm.z / bovinated-logo.scm
Encoding:
GIMP Script-Fu Script  |  1999-07-21  |  3.3 KB  |  81 lines

  1. ; The GIMP -- an image manipulation program
  2. ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3. ; This program is free software; you can redistribute it and/or modify
  4. ; it under the terms of the GNU General Public License as published by
  5. ; the Free Software Foundation; either version 2 of the License, or
  6. ; (at your option) any later version.
  7. ; This program is distributed in the hope that it will be useful,
  8. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. ; GNU General Public License for more details.
  11. ; You should have received a copy of the GNU General Public License
  12. ; along with this program; if not, write to the Free Software
  13. ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. ;
  15. ;  Bovinated Logos v0.1 04/08/98
  16. ;  by Brian McFee <keebler@wco.com>
  17. ;  Creates Cow-spotted logs.. what else?
  18.  
  19. (define (script-fu-bovinated-logo text size font)
  20.   (let* ((img (car (gimp-image-new 256 256 RGB)))
  21.          (border (/ size 4))
  22.      (text-layer (car (gimp-text img -1 0 0 text border TRUE size PIXELS "*" font "*" "*" "*" "*")))
  23.      (width (car (gimp-drawable-width text-layer)))
  24.      (height (car (gimp-drawable-height text-layer)))
  25.      (bg-layer (car (gimp-layer-new img width height RGBA_IMAGE "Background" 100 NORMAL)))
  26.      (blur-layer (car (gimp-layer-new img width height RGBA_IMAGE "Blur" 100 NORMAL)))
  27.      (old-fg (car (gimp-palette-get-foreground)))
  28.      (old-bg (car (gimp-palette-get-background))))
  29.     (gimp-image-disable-undo img)
  30.     (gimp-image-resize img width height 0 0)
  31.     (gimp-image-add-layer img bg-layer 1)
  32.     (gimp-image-add-layer img blur-layer 1)
  33.  
  34.     (gimp-selection-all img bg-layer)
  35.     (gimp-edit-fill img bg-layer)
  36.     (gimp-selection-none img)
  37.  
  38.     (gimp-layer-set-preserve-trans blur-layer TRUE)
  39.     (gimp-palette-set-background '(255 255 255))
  40.     (gimp-selection-all img blur-layer)
  41.     (gimp-edit-fill img blur-layer)
  42.     (gimp-edit-clear img blur-layer)
  43.     (gimp-palette-set-background '(191 191 191))
  44.     (gimp-selection-none img)
  45.     (gimp-layer-set-preserve-trans blur-layer FALSE)
  46.     (gimp-selection-layer-alpha img text-layer)
  47.     (gimp-edit-fill img blur-layer)
  48.     (plug-in-gauss-rle 1 img blur-layer 5.0 1 1)
  49.     (gimp-selection-none img)
  50.     (gimp-layer-set-preserve-trans text-layer TRUE)
  51.     (gimp-selection-all img text-layer)
  52.     (plug-in-solid-noise 1 img text-layer 0 0 23 1 16.0 4.0)
  53.     (gimp-brightness-contrast img text-layer 0 127)
  54.     (gimp-selection-none img)
  55.     (gimp-layer-set-preserve-trans text-layer FALSE)
  56.     (gimp-layer-set-name text-layer text)
  57.     (plug-in-bump-map 1 img text-layer blur-layer 135 50 10 0 0 0 30 TRUE FALSE 0)
  58.     (gimp-layer-set-offsets blur-layer 5 5)
  59.     (gimp-invert img blur-layer)
  60.     (gimp-layer-set-opacity blur-layer 50.0)
  61.     (gimp-image-set-active-layer img text-layer)
  62.     (gimp-palette-set-background old-bg)
  63.     (gimp-palette-set-foreground old-fg)
  64.     (gimp-image-enable-undo img)
  65.     (gimp-display-new img)))
  66.  
  67.  
  68. (script-fu-register "script-fu-bovinated-logo"
  69.             "<Toolbox>/Xtns/Script-Fu/Logos/Bovination"
  70.             "Makes Cow-spotted logos"
  71.             "Brian McFee <keebler@wco.com>"
  72.             "Brian McFee"
  73.             "April 1998"
  74.             ""
  75.             SF-VALUE "Text String" "\"Fear the Cow\""
  76.             SF-VALUE "Font Size (in pixels)" "80"
  77.             SF-VALUE "Font" "\"roostheavy\"")
  78.